/*
 *   AS IS License
 * ==Naive Coders==
 */
package org.naive.crunch;

/**
 *
 * @author gbu.000
 */
public class Bitfield {

    private final int size;
    private final int[] segments;

    public Bitfield(int s) {
        segments = new int[s / 2 + 1];
        size = s;
    }

    public boolean testBit(int offset) {
        return false;
    }
    
    private void increment(int i) {
        segments[i] ++;
        if (segments[i]>size) {
            segments[i] = 0;
            increment(i+1);
        }
    }
    
    public void increment() {
        segments[0] ++;
        if (segments[0]>size) {
            segments[0] = 0;
        }
        
    }
}
